class CreateAvatars < ActiveRecord::Migration
  def self.up
    create_table :avatars do |t|
      t.references :avatarable, :polymorphic => true

      t.string :content_type
      t.string :filename
      t.integer :parent_id
      t.string :thumbnail
      t.integer :size
      t.integer :width
      t.integer :height

    end
    add_index :avatars, :avatarable_type
    add_index :avatars, :avatarable_id
  end

  def self.down
    drop_table :avatars
  end
end
